Direct to Java Client uses EOAction objects to describe the actions associated with menu commands and buttons.
The default Direct to Java Client rules provide hooks for adding to an application's actions--the commands available in the application's main menu. Recall that when an application starts up, it makes a rule system request with the request key availableActions. By default, the system populates an application's menu with commands to Quit, open the Query Window, and so on.
To add custom commands to the menu, you create a rule with the key additionalActions. The value should be a D2WComponent that generates XML to describe an EOAction. When the availableActions rule is fired, any rule with the request key additionalActions is also fired, and the resulting EOAction is added to the set of default actions.
To add the "About WebObjects" command to the Tools menu, do the following:
Write a custom rule that specifies the following:
Condition (Lhs): empty (the rule should always fire)
Request key (Rhs key): additionalActions
Value (Rhs value): AboutWebObjectsActions
Priority: 50
The value, AboutWebObjectsActions is a D2WComponent that generates the XML for the custom action.